﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApp19.One
{
    /// <summary>
    /// 具体状态
    /// </summary>
    class ConcreteStateB : State
    {
        /// <summary>
        /// 设置ConcreteStateB的下一状态是ConcreteStateA
        /// </summary>
        /// <param name="context"></param>
        public override void Handle(Context context)
        {
            Console.WriteLine("当前状态：" + this.GetType().Name);
            context.State = new ConcreteStateA();
        }
    }
}
